<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ page isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Pragma" content="no-cache">
<link href="../style.css" rel="stylesheet" type="text/css">
<link href="<c:url value='/admin/assets/style/jqueryform.css'/>" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/admin/assets/js/util.js"></script>
<script type="text/javascript" src="<c:url value='/admin/assets/js/jquery/jquery.js'/>"></script>
<script type="text/javascript" src="<c:url value='/admin/assets/js/jquery/jquery-validate/lib/jquery.metadata.js'/>"></script>
<script type="text/javascript" src="<c:url value='/admin/assets/js/jquery/jquery-validate/jquery.validate.js'/>"></script>
<script type="text/javascript" language="javascript">
// <![CDATA[
$(document).ready(function() {

	var validator = $("#sliderLogoForm").validate({
		rules: {
			title: 	        		{required: true },
			pic:					{<c:if test="${null == requestScope.sliderLogo}">required: true,</c:if>	accept: 'gif|jpeg|jpg|png|bmp'}
		},
		messages: {
					title: { 
						required:"请输入标题. "
					},
					pic:{
						<c:if test="${null == requestScope.sliderLogo}">required: "请输入Logo图片.",</c:if>
						accept: "请输入拥有合法后缀名的字符串"
					}
		} 
	});




<c:if test="${not empty requestScope.message}">
$("#infoSpan").html("<img src='<c:url value='/admin/assets/images/flag.gif'/>'><font color='#C00000'><c:out value='${requestScope.message}' escapeXml='false'/></font>");
</c:if>


<c:if test="${null != requestScope.sliderLogo}">
$("#sliderLogoForm").attr('action',"<c:url value='/admin/article/sliderLogo-edit.ac'/>");
</c:if>

});
// ]]>
</script>
<script language="javascript">
function check()
{
	
	var title = document.getElementById("title");
	if(title.value.trim()=="")
	{
		OS.showWarming("errorTd","请输入文章标题!");
		title.focus();
		return false;
	}
	else
	{
		OS.hideWarming("errorTd");
	}

}

window.onload = function()
{
	
}
</script>
</head>
<body class="main">
<form action="<c:url value='/admin/article/sliderLogo-add.ac'/>" method="post" enctype="multipart/form-data"  name="sliderLogoForm" id="sliderLogoForm">
<input type="hidden" id="id" name="id" value="${requestScope.sliderLogo.id}"/>
<table class="container" cellpadding="0" cellspacing="0">
<tr><td>
<table width="700" align="center" cellpadding="0" cellspacing="0" class="dialog">
<tr><td >
<table class="header" cellpadding="0" cellspacing="0">
<tr>
<td>滑动Logo编辑</td>
</tr>
</table>
</td></tr>
<tr>
  <td   class="body">
<table class="body" cellpadding="0" cellspacing="0">
<tr>
  <td colspan="2" align="center" id="errorTd">&nbsp;</td>
</tr>
  <tr>
  <td width="14%" align="right"><strong>标题：</strong></td>
  <td width="30%"><input type="text" name="title" id="title" size="50" maxlength="100" value="${requestScope.sliderLogo.title}"></td>
  </tr>
  <tr>
  <td align="right"><strong>URL：</strong></td>
  <td><input type="text" name="url" id="url" size="50" maxlength="100" value="${requestScope.sliderLogo.url}"></td>
</tr>

<tr>
    <td align="right"><strong>图片：</strong></td>
    <td><label><input type="file" name="pic" id="pic" style="height:25px;width:300px" contenteditable="false"></label>
    </td>
</tr>
<tr>
  <td align="right"><strong></strong></td>
  <td align="left">
    <div align="left" style="padding-left:7px">
		<ul class="arialyellow">
		<li>请选择[gif|jpeg|jpg|png|bmp]图片文件.</li>
        <li><label for="width">缩略图尺寸:</label><br /><span>宽 771 象素，高 126 象素。</span>.</li>
		</ul>
    </div>
    </td></tr>
    
</table>
</td></tr>
<tr><td>
<table class="footer" cellpadding="0" cellspacing="0">
<tr><td>
<input class="button" type="submit" value="确定">
&nbsp;&nbsp;<input class="button" type="button" value="返回" onClick="document.location='javascript:history.go(-1)'">
</td></tr>
</table>
</td></tr>
</table>
</td></tr>
</table>
</form>

</body>
</html>
